home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / dev / lang / Python16_Src.lha / Python16_Source / Modules / Makefile.pre < prev    next >
Encoding:
Makefile  |  2000-09-09  |  6.8 KB  |  254 lines

  1. # Generated automatically from Makefile.pre.in by configure.
  2. # META-NOTE: this note is different from the note in the other Makefiles!
  3. # NOTE: Makefile.pre.in is converted into Makefile.pre by the configure
  4. # script in the toplevel directory or by ../config.status.
  5. # Makefile.pre is converted into Makefile by running the makesetup
  6. # script in the source directory.  Once Makefile exists, it can be
  7. # brought up to date by running "make Makefile".  (The makesetup also
  8. # creates config.c from config.c.in in the source directory.)
  9.  
  10. # === Variables set by makesetup ===
  11.  
  12. MODOBJS=    _MODOBJS_
  13. MODLIBS=    _MODLIBS_
  14.  
  15. # === Variables set by configure ===
  16.  
  17. VERSION=    1.6
  18. srcdir=        .
  19.  
  20. CXX = 
  21. CC=        gcc
  22. RANLIB=        ranlib
  23. AR=        ar
  24.  
  25. OPT=        -g -O2
  26. LDFLAGS=    
  27. LDLAST=        
  28. SGI_ABI=    
  29.  
  30. DEFS=        -DHAVE_CONFIG_H
  31. LIBS=        -lieee -lpthread -ldl 
  32. LIBM=        -lm
  33. LIBC=        
  34.  
  35. # Machine-dependent subdirectories
  36. MACHDEP=    linux2
  37.  
  38. # Install prefix for architecture-independent files
  39. prefix=        /usr/local
  40.  
  41. # Install prefix for architecture-dependent files
  42. exec_prefix=    ${prefix}
  43.  
  44. # Expanded directories
  45. BINDIR=        $(exec_prefix)/bin
  46. LIBDIR=        $(exec_prefix)/lib
  47. MANDIR=        $(prefix)/man
  48. INCLUDEDIR=    $(prefix)/include
  49. SCRIPTDIR=    $(prefix)/lib
  50.  
  51. # Detailed destination directories
  52. BINLIBDEST=    $(LIBDIR)/python$(VERSION)
  53. LIBDEST=    $(SCRIPTDIR)/python$(VERSION)
  54. INCLUDEPY=    $(INCLUDEDIR)/python$(VERSION)
  55. LIBP=        $(LIBDIR)/python$(VERSION)
  56.  
  57. # Symbols used for using shared libraries
  58. SO=        .so
  59. LDSHARED=    gcc -shared
  60. CCSHARED=    -fpic
  61. LINKFORSHARED=    -Xlinker -export-dynamic
  62. DESTSHARED=    $(BINLIBDEST)/lib-dynload
  63.  
  64. # Portable install script (configure doesn't always guess right)
  65. INSTALL=    ./../install-sh -c
  66. INSTALL_PROGRAM=${INSTALL} -m 755
  67. INSTALL_DATA=    ${INSTALL} -m 644
  68. # Shared libraries must be installed with executable mode on some systems;
  69. # rather than figuring out exactly which, we always give them executable mode.
  70. # Also, making them read-only seems to be a good idea...
  71. INSTALL_SHARED=    ${INSTALL} -m 555
  72.  
  73. # === Variables that are customizable by hand or by inclusion in Setup ===
  74.  
  75. LINKCC=        $(PURIFY) $(CC)
  76. INCLDIR=    $(srcdir)/../Include
  77. CONFIGINCLDIR=    ..
  78. CFLAGS=        $(OPT) -I$(INCLDIR) -I$(CONFIGINCLDIR) $(DEFS)
  79.  
  80. MKDEP=        mkdep
  81. SHELL=        /bin/sh
  82.  
  83. MAKESETUP=    $(srcdir)/makesetup
  84.  
  85. # (The makesetup script inserts all variable definitions
  86. # found in the Setup file just below the following line.
  87. # This means that the Setup file can override any of the definitions
  88. # given before this point, but not any given below.
  89. # The script insert the definitions in reverse order,
  90. # for the benefits of independent extensions.)
  91. # === Definitions added by makesetup ===
  92.  
  93. # === Fixed definitions ===
  94.  
  95. FIXOBJS=    config.o getpath.o main.o getbuildinfo.o
  96. OBJS=        $(MODOBJS) $(FIXOBJS)
  97.  
  98. #MAINOBJ=    python.o
  99. MAINOBJ=    python.o
  100.  
  101. SYSLIBS=    $(LIBM) $(LIBC)
  102.  
  103. LIBRARY=    ../libpython$(VERSION).a
  104. LDLIBRARY=    ../libpython$(VERSION).a
  105.  
  106. # === Rules ===
  107.  
  108. all:        $(OBJS)
  109.  
  110. # This target is used by the master Makefile to add the objects to the library.
  111. # To deal with the conflict between signalmodule.o and
  112. # sigcheck.o+intrcheck.o, we remove the latter two if we have the former.
  113. add2lib:    $(OBJS)
  114.         -if test -f hassignal; \
  115.         then echo removing sigcheck.o intrcheck.o; \
  116.              $(AR) d $(LIBRARY) sigcheck.o intrcheck.o 2>/dev/null; \
  117.         else echo leaving sigcheck.o intrcheck.o in; fi
  118.         $(AR) cr $(LIBRARY) $(OBJS)
  119.         touch add2lib
  120.  
  121. # Use ``EXE=.exe'' for Unix emulations on DOS/Windows
  122. EXE=
  123.  
  124. # This target is used by the master Makefile to link the final binary.
  125. link:        $(MAINOBJ)
  126.         $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) $(MAINOBJ) \
  127.           $(LDLIBRARY) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python $(LDLAST)
  128.         mv python$(EXE) ../python$(EXE)
  129.  
  130. clean:
  131.         -rm -f *.o python$(EXE) core *~ [@,#]* *.old *.orig *.rej
  132.         -rm -f add2lib hassignal
  133.  
  134. clobber:    clean
  135.         -rm -f *.a tags TAGS config.c Makefile.pre
  136.         -rm -f *.so *.sl so_locations
  137.  
  138. getpath.o:    getpath.c Makefile
  139.         $(CC) -c $(CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
  140.               -DPREFIX='"$(prefix)"' \
  141.               -DEXEC_PREFIX='"$(exec_prefix)"' \
  142.               -DVERSION='"$(VERSION)"' \
  143.               -DVPATH='"$(VPATH)"' \
  144.               $(srcdir)/getpath.c
  145.  
  146. # When the configuration changes, we remove the library, so that it
  147. # gets remade from scratch; this ensures to remove modules that are no
  148. # longer pertinent (but that were in a previous configuration).
  149. config.c Makefile: Makefile.pre config.c.in $(MAKESETUP)
  150. config.c Makefile: Setup.thread Setup Setup.local
  151. config.c Makefile:
  152.         -rm -f $(LIBRARY)
  153.         $(SHELL) $(MAKESETUP) Setup.thread Setup.local Setup
  154.  
  155. hassignal:
  156.         -rm -f hassignal
  157.         -for i in $(OBJS); do \
  158.             if test "$$i" = "signalmodule.o"; then \
  159.                echo yes >hassignal; break; \
  160.             fi; \
  161.         done
  162.  
  163. Setup:
  164.         cp $(srcdir)/Setup.in Setup
  165.  
  166. Setup.local:
  167.         echo "# Edit this file for local setup changes" >Setup.local
  168.  
  169. Makefile.pre:    Makefile.pre.in ../config.status
  170.         (cd ..; CONFIG_FILES=Modules/Makefile.pre CONFIG_HEADERS= \
  171.         $(SHELL) config.status)
  172.  
  173. depend:
  174.         $(MKDEP) $(CFLAGS) `echo $(OBJS) | tr ' ' '\012' | \
  175.                     sed 's|\(.*\)\.o|$(srcdir)/\1.c|'`
  176.  
  177. .PRECIOUS:    ../python$(EXE)
  178.  
  179. glmodule.c:    $(srcdir)/cgen.py $(srcdir)/cstubs
  180.         python $(srcdir)/cgen.py <$(srcdir)/cstubs >glmodule.c
  181.  
  182. almodule.o: almodule.c
  183. arraymodule.o: arraymodule.c
  184. audioop.o: audioop.c
  185. cdmodule.o: cdmodule.c
  186. cgensupport.o: cgensupport.c
  187. clmodule.o: clmodule.c
  188. _codecsmodule.o: _codecsmodule.c
  189. dbmmodule.o: dbmmodule.c
  190. errnomodule.o: errnomodule.c
  191. fcntlmodule.o: fcntlmodule.c
  192. flmodule.o: flmodule.c
  193. fmmodule.o: fmmodule.c
  194. glmodule.o: glmodule.c
  195. imageop.o: imageop.c
  196. imgfile.o: imgfile.c
  197. main.o: main.c
  198. mathmodule.o: mathmodule.c
  199. md5c.o: md5c.c
  200. md5module.o: md5module.c
  201. mpzmodule.o: mpzmodule.c
  202. nismodule.o: nismodule.c
  203. operator.o: operator.c
  204. parsermodule.o: parsermodule.c
  205. posixmodule.o: posixmodule.c
  206. pwdmodule.o: pwdmodule.c
  207. regexmodule.o: regexmodule.c
  208. regexpr.o: regexpr.c
  209. resource.o: resource.c
  210. rgbimgmodule.o: rgbimgmodule.c
  211. rotormodule.o: rotormodule.c
  212. selectmodule.o: selectmodule.c
  213. sgimodule.o: sgimodule.c
  214. socketmodule.o: socketmodule.c
  215. stdwinmodule.o: stdwinmodule.c
  216. stropmodule.o: stropmodule.c
  217. structmodule.o: structmodule.c
  218. sunaudiodev.o: sunaudiodev.c
  219. svmodule.o: svmodule.c
  220. threadmodule.o: threadmodule.c
  221. timemodule.o: timemodule.c
  222. timingmodule.o: timingmodule.c
  223. unicodedata.o: unicodedata.c unicodedatabase.o
  224. unicodedatabase.o: unicodedatabase.c unicodedatabase.h
  225. xxmodule.o: xxmodule.c
  226. yuvconvert.o: yuvconvert.c
  227.  
  228. # Rules to build and install all shared modules
  229. sharedmods:    $(SHAREDMODS)
  230. sharedinstall:    $(DESTSHARED) $(SHAREDMODS)
  231.         -for i in X $(SHAREDMODS); do \
  232.             if test $$i != X; \
  233.             then $(INSTALL_SHARED) $$i $(DESTSHARED)/$$i; \
  234.             fi; \
  235.         done
  236.  
  237. DESTDIRS=    $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
  238.  
  239. $(DESTSHARED): 
  240.         @for i in $(DESTDIRS); \
  241.         do \
  242.             if test ! -d $$i; then \
  243.                 echo "Creating directory $$i"; \
  244.                 mkdir $$i; \
  245.                 chmod 755 $$i; \
  246.             else    true; \
  247.             fi; \
  248.         done
  249.  
  250. ccpython.o: ccpython.cc
  251.     $(CXX) $(CFLAGS) -c $*.cc
  252.  
  253. # Stuff is appended here by makesetup and make depend
  254.